package org.myapp.constants;

public enum UserAuthority {
    ADMIN("admin"),USER("user");

    private final String value;

    private UserAuthority(String arg) {
        this.value = arg;
    }

    public String getValue() {
        return this.value;
    }

    public static UserAuthority getObject(String arg) {
        if (arg.equals(ADMIN.getValue())) {
            return ADMIN;
        } else {
            return USER;
        }
    }
}
